<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<script src="../vue.js"></script>

<body>
  <div id="app">
    <!-- <my-compoment></my-compoment> -->
    <com1></com1>
  </div>

  <script>
    const com1 = {
      template: "<p>我是vm实例中的局部注册组件</p>",
    }

    const vm = new Vue({
      el: "#app",
      data: {},
      methods: {},
      // 局部注册组件
      components: {
        // myComponent: com1,
        com1,
      }
    })
  </script>
</body>

</html>